package cn.jinjimi.app.custom.ui.view;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;

import cn.jinjimi.framework.helper.annotation.EventTrace;
import cn.jinjimi.app.R;
import cn.jinjimi.app.bean.EventID;
import cn.jinjimi.app.main.activity.LoginActivity;

/**
 * Created by Roy
 * Date: 16/6/2
 */
public class CustomGuideView extends RelativeLayout {

    private Context mContext;

    public CustomGuideView(Context context) {
        super(context);
        mContext = context;
        inflate(context, R.layout.fragment_customer_guide_layut, this);

        initView();
    }

    private void initView() {
        findViewById(R.id.btn_login).setOnClickListener(new View.OnClickListener() {
            @Override
            @EventTrace(EventID.APP_CUSTOMER_LOGIN)
            public void onClick(View v) {
                LoginActivity.setLoginFrom(EventID.APP_CUSTOMER_LOGIN);
                mContext.startActivity(new Intent(mContext, LoginActivity.class));
            }
        });
    }

}
